///////////////////////////////////////////////////////////////
// This is generated code. 
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 2.6
// Code is generated on: Tuesday, July 12, 2011 11:08:16 AM
// Code is generated using templates: SD.TemplateBindings.SharedTemplates.NET20
// Templates vendor: Solutions Design.
// Templates version: 
//////////////////////////////////////////////////////////////
using System;
using System.Collections;
using System.Collections.Generic;
using DatabaseGeneric;
using DatabaseGeneric.FactoryClasses;
using DatabaseGeneric.HelperClasses;
using SD.LLBLGen.Pro.ORMSupportClasses;

namespace DatabaseGeneric.RelationClasses
{
    /// <summary>Implements the static Relations variant for the entity: SanPhamKhuon. </summary>
    public partial class SanPhamClastRelations
    {
        /// <summary>CTor</summary>
        public SanPhamClastRelations()
        {
        }

        /// <summary>Gets all relations of the SanPhamKhuonEntity as a list of IEntityRelation objects.</summary>
        /// <returns>a list of IEntityRelation objects</returns>
        public virtual List<IEntityRelation> GetAllRelations()
        {
            List<IEntityRelation> toReturn = new List<IEntityRelation>();


            toReturn.Add(this.ChungLoaiSanPhamEntityUsingMaChungLoaiSanPham);
            return toReturn;
        }

        #region Class Property Declarations



        /// <summary>Returns a new IEntityRelation object, between SanPhamKhuonEntity and ChungLoaiSanPhamEntity over the m:1 relation they have, using the relation between the fields:
        /// SanPhamKhuon.MaChungLoaiSanPham - ChungLoaiSanPham.MaChungLoaiSanPham
        /// </summary>
        public virtual IEntityRelation ChungLoaiSanPhamEntityUsingMaChungLoaiSanPham
        {
            get
            {
                IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.ManyToOne, "ChungLoaiSanPham", false);
                relation.AddEntityFieldPair(ChungLoaiSanPhamFields.MaChungLoaiSanPham, SanPhamClastFields.MaChungLoaiSanPham);
                relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("ChungLoaiSanPhamEntity", false);
                relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("SanPhamClastEntity", true);
                return relation;
            }
        }

        /// <summary>stub, not used in this entity, only for TargetPerEntity entities.</summary>
        public virtual IEntityRelation GetSubTypeRelation(string subTypeEntityName) { return null; }
        /// <summary>stub, not used in this entity, only for TargetPerEntity entities.</summary>
        public virtual IEntityRelation GetSuperTypeRelation() { return null; }

        #endregion

        #region Included Code

        #endregion
    }
}

